package com.chenfan.common.core.domain;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description:
 * @author: weishili
 * @date: 2020/7/14
 * @version: V1.0
 */
@Deprecated
public abstract class ClientObject implements Serializable {

    private static final long serialVersionUID = 550891848728366813L;

    @Getter
    @Setter
    protected Map<String, Object> extValues = new ConcurrentHashMap<>();

    public <T> T getExtField(String key) {
        if (extValues != null) {
            return (T) extValues.get(key);
        }
        return null;
    }

    public void putExtField(String key, Object value) {
        this.extValues.put(key, value);
    }

}
